package reduce.fz.com.reduce.adapter;

import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;

import reduce.fz.com.reduce.bean.Card;

/**
 * Created by qingshengzheng on 15/7/23.
 */
public abstract class AbstractRecycleHolder<VH> extends RecyclerView.ViewHolder {
    protected RecyclerView.Adapter adapter;
    protected View itemView;
    public   LayoutInflater layoutInflater;
    public Context context;

    public AbstractRecycleHolder(View itemView) {
        super(itemView);
    }

    public AbstractRecycleHolder(View itemView, RecyclerView.Adapter adapter) {
        super(itemView);

        layoutInflater=LayoutInflater.from(itemView.getContext());
        this.adapter = adapter;
        this.itemView = itemView;
        this.context=itemView.getContext();
        initView();
    }

    public abstract void renderView(VH bean);

    public abstract void initView();


}
